using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._IntelligenceTools._Movement
{
    /// <summary>
    /// <para>Compare Areas</para>
    /// <para>Compares movement point tracks across multiple known areas of interest.</para>
    /// <para>比较多个已知感兴趣区域的运动点轨迹。</para>
    /// </summary>    
    [DisplayName("Compare Areas")]
    public class CompareAreas : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CompareAreas()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_point_features">
        /// <para>Input Point Features</para>
        /// <para>The point features representing the movement track points. The layer can be time enabled.</para>
        /// <para>表示运动轨迹点的点要素。该图层可以启用时间。</para>
        /// </param>
        /// <param name="_in_area_features">
        /// <para>Input Area Features</para>
        /// <para>The area features representing the areas of interest that will be used to identify unique movement track point identifiers. The layer can be time enabled.</para>
        /// <para>区域要素表示将用于识别唯一移动轨迹点标识符的感兴趣区域。该图层可以启用时间。</para>
        /// </param>
        /// <param name="_out_featureclass">
        /// <para>Output Feature Class</para>
        /// <para><xdoc>
        ///   <para>The output area feature class. The output will contain a copy of the Input Area Features geometry and the unique identifiers from the Area Features Name Field and Point Features Name Field parameters.</para>
        ///   <para>If both the Input Point Features and Input Area Features parameter values are time enabled and Relationship is set to Location and Time, only the features matching the geometry and the time span will be returned.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出区域要素类。输出将包含输入区域要素几何的副本以及来自“区域要素名称字段”和“点要素名称字段”参数的唯一标识符。</para>
        ///   <para>如果“输入点要素”和“输入区域要素”参数值都启用了时间，并且“关系”设置为“位置和时间”，则仅返回与几何和时间跨度匹配的要素。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_point_id_field">
        /// <para>Point Features Name Field</para>
        /// <para>The field containing the unique identifiers for the movement track points. The field can be either a number or a string.</para>
        /// <para>包含移动轨迹点的唯一标识符的字段。该字段可以是数字或字符串。</para>
        /// </param>
        /// <param name="_area_id_field">
        /// <para>Area Features Name Field</para>
        /// <para>The field containing the unique identifiers for the areas of interest. The field can be either a number or a string.</para>
        /// <para>包含感兴趣区域的唯一标识符的字段。该字段可以是数字或字符串。</para>
        /// </param>
        /// <param name="_relationship">
        /// <para>Relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies the relationship between the inputs.</para>
        ///   <bulletList>
        ///     <bullet_item>Location Only— Points and area features will be evaluated based on spatial co-occurrence.</bullet_item><para/>
        ///     <bullet_item>Location and Time— Points and area features will be evaluated based on spatial and temporal co-occurrence.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入之间的关系。</para>
        ///   <bulletList>
        ///     <bullet_item>仅位置 - 将根据空间共现来评估点和面要素。</bullet_item><para/>
        ///     <bullet_item>位置和时间 - 将根据空间和时间共现来评估点和区域要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CompareAreas(object _in_point_features, object _in_area_features, object _out_featureclass, object _point_id_field, object _area_id_field, _relationship_value _relationship)
        {
            this._in_point_features = _in_point_features;
            this._in_area_features = _in_area_features;
            this._out_featureclass = _out_featureclass;
            this._point_id_field = _point_id_field;
            this._area_id_field = _area_id_field;
            this._relationship = _relationship;
        }
        public override string ToolboxName => "Intelligence Tools";

        public override string ToolName => "Compare Areas";

        public override string CallName => "intelligence.CompareAreas";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "parallelProcessingFactor", "workspace"];

        public override object[] ParameterInfo => [_in_point_features, _in_area_features, _out_featureclass, _point_id_field, _area_id_field, _relationship.GetGPValue(), _time_difference];

        /// <summary>
        /// <para>Input Point Features</para>
        /// <para>The point features representing the movement track points. The layer can be time enabled.</para>
        /// <para>表示运动轨迹点的点要素。该图层可以启用时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Input Area Features</para>
        /// <para>The area features representing the areas of interest that will be used to identify unique movement track point identifiers. The layer can be time enabled.</para>
        /// <para>区域要素表示将用于识别唯一移动轨迹点标识符的感兴趣区域。该图层可以启用时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Area Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_area_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para><xdoc>
        ///   <para>The output area feature class. The output will contain a copy of the Input Area Features geometry and the unique identifiers from the Area Features Name Field and Point Features Name Field parameters.</para>
        ///   <para>If both the Input Point Features and Input Area Features parameter values are time enabled and Relationship is set to Location and Time, only the features matching the geometry and the time span will be returned.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出区域要素类。输出将包含输入区域要素几何的副本以及来自“区域要素名称字段”和“点要素名称字段”参数的唯一标识符。</para>
        ///   <para>如果“输入点要素”和“输入区域要素”参数值都启用了时间，并且“关系”设置为“位置和时间”，则仅返回与几何和时间跨度匹配的要素。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_featureclass { get; set; }


        /// <summary>
        /// <para>Point Features Name Field</para>
        /// <para>The field containing the unique identifiers for the movement track points. The field can be either a number or a string.</para>
        /// <para>包含移动轨迹点的唯一标识符的字段。该字段可以是数字或字符串。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Features Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _point_id_field { get; set; }


        /// <summary>
        /// <para>Area Features Name Field</para>
        /// <para>The field containing the unique identifiers for the areas of interest. The field can be either a number or a string.</para>
        /// <para>包含感兴趣区域的唯一标识符的字段。该字段可以是数字或字符串。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Area Features Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _area_id_field { get; set; }


        /// <summary>
        /// <para>Relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies the relationship between the inputs.</para>
        ///   <bulletList>
        ///     <bullet_item>Location Only— Points and area features will be evaluated based on spatial co-occurrence.</bullet_item><para/>
        ///     <bullet_item>Location and Time— Points and area features will be evaluated based on spatial and temporal co-occurrence.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入之间的关系。</para>
        ///   <bulletList>
        ///     <bullet_item>仅位置 - 将根据空间共现来评估点和面要素。</bullet_item><para/>
        ///     <bullet_item>位置和时间 - 将根据空间和时间共现来评估点和区域要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Relationship")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _relationship_value _relationship { get; set; }

        public enum _relationship_value
        {
            /// <summary>
            /// <para>Location Only</para>
            /// <para>Location Only— Points and area features will be evaluated based on spatial co-occurrence.</para>
            /// <para>仅位置 - 将根据空间共现来评估点和面要素。</para>
            /// </summary>
            [Description("Location Only")]
            [GPEnumValue("LOCATION_ONLY")]
            _LOCATION_ONLY,

            /// <summary>
            /// <para>Location and Time</para>
            /// <para>Location and Time— Points and area features will be evaluated based on spatial and temporal co-occurrence.</para>
            /// <para>位置和时间 - 将根据空间和时间共现来评估点和区域要素。</para>
            /// </summary>
            [Description("Location and Time")]
            [GPEnumValue("LOCATION_TIME")]
            _LOCATION_TIME,

        }

        /// <summary>
        /// <para>Time Difference</para>
        /// <para>The time allowed between the Input Point Features and Input Area Features parameter values before a spatial relationship is considered invalid. This parameter is active when the Relationship parameter is set to Location and Time and both inputs are time enabled.</para>
        /// <para>在空间关系被视为无效之前，输入点要素和输入区域要素参数值之间允许的时间。当 Relationship 参数设置为 Location 和 Time 并且两个输入都启用了时间时，此参数处于活动状态。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Difference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_difference { get; set; } = null;


        public CompareAreas SetEnv(object extent = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, workspace: workspace);
            return this;
        }

    }

}